package com.nine.dao;

import java.util.List;

import com.nine.entity.Package;

public interface PackageMapper {
	/**
	 * 获取所有套餐信息
	 * @return 套餐实体集合
	 */
	List<Package> getAllPackage();
	
	/**
	 * 条件搜索套餐信息
	 * @param p 条件实体（套餐实体）
	 * @return 套餐实体集合
	 */
	List<Package> getAllPackageByCondition(Package p);
	
	/**
	 * 删除套餐
	 * 支持单条删除和多条删除
	 * @param pgid 套餐编号数组
	 * @return 影响行数
	 */
	int deleteMorePackage(String[] pgid);
	
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table package
     *
     * @mbggenerated Sat Sep 22 01:41:07 CST 2018
     */
    int deleteByPrimaryKey(String pgid);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table package
     *
     * @mbggenerated Sat Sep 22 01:41:07 CST 2018
     */
    int insert(Package record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table package
     *
     * @mbggenerated Sat Sep 22 01:41:07 CST 2018
     */
    int insertSelective(Package record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table package
     *
     * @mbggenerated Sat Sep 22 01:41:07 CST 2018
     */
    Package selectByPrimaryKey(String pgid);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table package
     *
     * @mbggenerated Sat Sep 22 01:41:07 CST 2018
     */
    int updateByPrimaryKeySelective(Package record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table package
     *
     * @mbggenerated Sat Sep 22 01:41:07 CST 2018
     */
    int updateByPrimaryKey(Package record);
    /**
     * 获取所有的套餐列表
     * @return
     */
    public List<Package> getAllPackage(Package package1);
}